package com.agricultural.machine.state;

import com.agricultural.machine.common.IMachine;
import com.agricultural.machine.common.MachineState;

/**
 * 紧急停止状态 - 状态模式
 */
public class EmergencyStoppedState implements MachineState {
    @Override
    public String getDescription() {
        return "紧急停止";
    }

    @Override
    public void start(IMachine machine) {
        System.out.println("警告：农机 " + machine.getMachineId() + " 处于紧急停止状态，无法启动");
    }

    @Override
    public void stop(IMachine machine) {
        System.out.println("农机 " + machine.getMachineId() + " 已经是停止状态");
    }

    @Override
    public void executeTask(IMachine machine, String task) {
        System.out.println("警告：农机 " + machine.getMachineId() + " 处于紧急停止状态，无法执行任务: " + task);
    }
}


